package com.icart.entities;

import javax.persistence.*;

@Entity
@Table(name = "bi_chnpic", schema = "ams", catalog = "")
public class BiChnpicEntity {
    private int chnid;
    private int picid;
    private String picurl;
    private Integer isdefault;
    private String remark;
    private Integer pickind;

    @Basic
    @Column(name = "chnid")
    public int getChnid() {
        return chnid;
    }

    public void setChnid(int chnid) {
        this.chnid = chnid;
    }

    @Id
    @Column(name = "picid")
    public int getPicid() {
        return picid;
    }

    public void setPicid(int picid) {
        this.picid = picid;
    }

    @Basic
    @Column(name = "picurl")
    public String getPicurl() {
        return picurl;
    }

    public void setPicurl(String picurl) {
        this.picurl = picurl;
    }

    @Basic
    @Column(name = "isdefault")
    public Integer getIsdefault() {
        return isdefault;
    }

    public void setIsdefault(Integer isdefault) {
        this.isdefault = isdefault;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "pickind")
    public Integer getPickind() {
        return pickind;
    }

    public void setPickind(Integer pickind) {
        this.pickind = pickind;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BiChnpicEntity that = (BiChnpicEntity) o;

        if (chnid != that.chnid) return false;
        if (picid != that.picid) return false;
        if (picurl != null ? !picurl.equals(that.picurl) : that.picurl != null) return false;
        if (isdefault != null ? !isdefault.equals(that.isdefault) : that.isdefault != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (pickind != null ? !pickind.equals(that.pickind) : that.pickind != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = chnid;
        result = 31 * result + picid;
        result = 31 * result + (picurl != null ? picurl.hashCode() : 0);
        result = 31 * result + (isdefault != null ? isdefault.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (pickind != null ? pickind.hashCode() : 0);
        return result;
    }
}
